// SpaceObj.h: interface for the CReadSpace class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_READSPACE_H__7C1BD187_F311_4FA1_8CAB_F5D1DE8AC74B__INCLUDED_)
#define AFX_READSPACE_H__7C1BD187_F311_4FA1_8CAB_F5D1DE8AC74B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "DAPCore.h"

#define DF_COMMAND	"df -k"
#define CAT_COMMAND	"cat /proc/mounts"

//////////////////////////////////////////////////////////////////////////
// Define class to read disk space
class CDiskObj : public CDAPObj
{
// Constructor
public:
	CDiskObj()
	{
		m_szMount="";
		m_nTotal=0;
		m_nUsed=0;
		m_nAvail=0;
	}
	~CDiskObj(){};
// Attribute
public:
	CDAPString		m_szMount;
	unsigned long	m_nTotal;
	unsigned long	m_nUsed;
	unsigned long	m_nAvail;
};
class CDiskObjList : public CTypedPtrList<CObList, CDiskObj*>
{
// Constructor
public:
	CDiskObjList(){};
	~CDiskObjList(){};
};

class  CSpaceObj : public CDAPObj  
{
public:
	CSpaceObj();
	virtual ~CSpaceObj();

// Attribute
public:
	CDiskObjList m_lstDisk;
// Operation
public:
#ifdef _LINUX_OS_
	unsigned long ReadExt3Count(CDAPString szDBVolName);
#endif
	float ReadSpace(CDAPString szDBVolName);
};

#endif // !defined(AFX_READSPACE_H__7C1BD187_F311_4FA1_8CAB_F5D1DE8AC74B__INCLUDED_)
